package org.nf.db.util.result;

import org.nf.db.util.ResultSetHandler;
import org.nf.db.util.RowProcessor;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @author wangl
 * @date 2021/7/28
 */

public class ArrayHandler implements ResultSetHandler<Object[]> {

    @Override
    public Object[] handle(ResultSet rs) throws SQLException {
        return rs.next() ? RowProcessor.toArray(rs) : null;
    }
}
